Ext.define('qjtravel.view.Main', {
    extend: 'Ext.tab.Panel',
    xtype: 'main',
    config: {
        tabBarPosition: 'bottom',
        id: "docked-tabbar",
        items: [
            {
                xtype: Global.home_name,
                title: '首页',
                iconCls: 'home'
            },
            {
                xtype: 'map',
                title: '地图导航',
                iconCls: 'maps'

            },
            {
                xtype: 'travel',
                title: '旅游攻略',
                iconCls: 'browser'

            },
            {
                xtype: 'spotsign',
                title: '照片墙',
                iconCls: 'news'

            },
            {
                xtype: 'more',
                title: '更多',
                iconCls: 'more'
            }
        ],
        listeners: {
            painted: function (main) {
                var clientW = document.body.clientWidth;
                if (clientW > 599) {
                    var btns = document.getElementsByClassName("x-button-label");
                    //console.log(btns)
                    Ext.each(btns, function (items, index) {
                        var btnText=items.innerText;
                        if(btnText=="首页"||btnText=="地图导航"||btnText=="旅游攻略"||btnText=="旅游签到"||btnText=="更多"||btnText=="照片墙"){
                            items.setAttribute("style", "font-size:1.3em;margin:3px auto;");
                        }
                    });
                }
            }

        }
    }
});
